<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
    <%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<!DOCTYPE html>
<%
	String path = request.getContextPath();
	String basePath = request.getScheme() + "://"+ request.getServerName() + ":" + request.getServerPort()+ path + "/";
%>
<html lang="en">
    <head>
        <meta charset="utf-8">
        <meta http-equiv="X-UA-Compatible" content="IE=11">
        <link rel="stylesheet" href="<%=basePath%>css/cssreset.css">
        <link rel="stylesheet" href="<%=basePath%>css/pagination.css">
        <link rel="stylesheet" href="<%=basePath%>style/hetongshenpi.css">
        <script src="<%=basePath%>js/jquery.min.js"></script>
        <script src="<%=basePath%>js/jquery.pagination.js"></script>
        <script src="<%=basePath%>js/menu.js"></script>
        <script src="<%=basePath%>salejihui/My97DatePicker/WdatePicker.js"></script>
        <style>
        	a{
        		text-decoration:none;
        		color:#708dac;
        	}
        	.psxa{
			color:#708dac;
			width:100%;
			line-height:23px;
			text-align: center;
			margin-top:27px;
			font-family: '微软雅黑';
			cursor:pointer;
			font-size:16px;
		}
		.ims{
			position:relative;
			top:4px;
			right:22px;
		}
		#cover3{
			position:fixed;
			top:50%;
			left:50%;
			margin-left:-370px;
			margin-top:-291px;
			display:none; 
		}
        </style>
    </head>
    <body>
    	<div class="headerxs">
    		<p class="pa">客户管理系统CRM</p>
    		<p class="rights">
	    		<img src="../images/user.png" alt="">
	    		${staff.staff_name}
	    		<button onclick="dians()"></button>
    		</p>
    	</div>
    	<section>
    		<ol class="lefts">
    			<li class="pb">
    				<img src="../images/Users and permissions.png" alt="">
    				用户和权限
    				<img src="../images/button (2).png" alt="">
    				<div class="div1">
    					<p class="zcd" id="zcd1"><a href="<%=basePath %>role/page.action">角色管理</a></p>
						<p class="zcd" id="zcd2"><a href="<%=basePath %>staff/selectTree.action">部门/用户管理</a></p>
    				</div>
    			</li>
    			<li class="px">
    				<img src="<%=basePath %>images/canshu.png" alt="">
    				业务参数和设定
    				<img src="<%=basePath %>images/button (2).png" alt="">
    				<div class="div1">
    					<%-- <p class="zcd" id="zcd1" name="ppa"><a href="<%=basePath %>tradeManage/select.action">行业管理</a></p>
                        <p class="zcd" id="zcd2" name="ppa"><a href="<%=basePath %>compactGenre/select.action">合同类型</a></p>
                        <p class="zcd" id="zcd1" name="ppa"><a href="<%=basePath %>rank/select.action">客户级别</a></p>--%>
                        <p class="zcd" id="zcd2" name="ppa"><a href="<%=basePath %>rank/select.action">申请性质</a></p> 
                        <p class="zcd" id="zcd2" name="ppa"><a href="<%=basePath %>salestage/select.action">产品类别</a></p> 
                        <p class="zcd" id="zcd2" name="ppa"><a href="<%=basePath %>record/select.action">来源渠道</a></p>
    				</div>
    			</li>
                <li class="py">
                    <img src="<%=basePath %>images/liucheng.png" />
                    	流程管理
                    <img src="<%=basePath %>images/button (2).png" />
                    <div class="div1" style="display:block">
                        <p class="zcd" id="zcd1"><a href="<%=basePath %>approveRole/select.action">审批流程管理</a></p>
                        <p class="zcd" id="zcd1"><a href="<%=basePath%>approve/count.action?pageSize=2" style="color:#fff;">已审批流程查看</a></p>
                    </div>
                </li>
                <li class="pxa">
                    <img src="../images/gonggao.png" alt="" width="18px">
                    <a href="../notice/page.action" style="color:#708dac;text-decoration: none;">公告管理&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</a>
                </li>
                <li class="pxaa">
                    <img src="../images/kehu (1).png" alt="">
                    		资源开发
                    <img src="../images/button (2).png" alt="">
                    <div class="div1">
                        <p class="zcd" id="zcd1"><a href="<%=basePath %>client/weifencount.action?zhuizong=0">用户开发</a></p>
                        <p class="zcd" id="zcd2"><a href="../client/findByAllForAgent.action?start=1">代理开发</a></p>
                    </div>
                </li> 
                <%-- <li class="pxas">
    				<img src="../images/kehuzilao.png" alt="">
    				客户资料
    				<img src="../images/button (2).png" alt="">
    				<div class="div1" >
    					<p class="zcd" id="zcd1"><a href="<%=basePath%>client/findByAllData.action?start=1">用户资料</a></p>
						<p class="zcd" id="zcd2"><a href="<%=basePath%>client/findByAllData.action">代理资料</a></p>
    				</div>
    			</li> --%>
    			<li class="psxa">
    				<img src="../images/operation-management.png" alt="" width="16px" class="ims">
    				<a href="<%=basePath %>Operate/count1.action">运营管理&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</a>
    			</li>
    		</ol>
    		<div class="righta">
    			<div class="smalls">
    				<p class="pj">开户审批</p>
    				<form action="<%=basePath%>approve/count.action?pageSize=2" method="post" style="float:right;margin-right:250px;" onsubmit="return tims()">
								
								<input type="text" name="condition" value="${condition}" id="endTime" placeholder="单位名称,客户电话"  style="width:200px;height:38px;position:relative;top:6px;border:1px solid #ccc;text-align:center;border-radius:5px;">
								<input type="submit" value="搜索" style="width:60px;height:38px;position:relative;top:6px;border:none;text-align:center;border-radius:5px;margin-left:10px;cursor:pointer;background:#1fd4fb;color:#fff;">
								<input type="button" onclick="daochu()" value="导出" style="width:60px;height:38px;position:relative;top:6px;border:none;text-align:center;border-radius:5px;margin-left:100px;cursor:pointer;background:#1fd4fb;color:#fff;">
							</form>
    				<div class="fen">
		    			<div class="headers">
		    				<p class="headerspa"><a href="<%=basePath%>approve/count.action?pageSize=2" style="color:#fff;">开户审批</a></p>
		    				<p class="headerspb"><a href="<%=basePath%>audits/count.action?pageSize=2">合同审核</a></p>
		    			</div>
		    		</div>
		    		<div class="xiangqing">
		 						<table>
    								<thead>
    									<tr>
    										<td>编码</td>
    										<td>单位名称</td>
    										<td>负责人</td>
    										<td>合同编号</td>
    										<td>客户电话</td>
    										<td>客服QQ</td>
    										<td>申请性质</td>
    										<td>合约比例</td>
    										<td>产品类别</td>
    										<td>招商经理</td>
    										<td>审批人</td>
    										<td>审批状态</td>
    										<td></td>	
    									</tr>
    								</thead>
    								<tbody class="tbodys">
    									
    								</tbody>
    							</table>
		    		</div>
		    		<div class="M-box" style="width:40%;margin:0px auto;"></div>
    			</div>
    		</div>
    	</section>
    	<footer>
			<!-- <div id="cover3">
						<form id="cover-content2" method="post">
							<h4>合 同 审 批 详 情<img src="../images/guanbsi.png" alt="" class="guan"></h4>
							<p class="main">
								<span class="leftmain">提 交 时 间</span>
								<input type="text" class="shurukuang" id="saleStageName">
							</p>
							<p class="main">
								<span class="leftmain">合 同 编 号</span>
								<input type="text"  class="shurukuang" id="contractId">
							</p>
							<p class="main">
								<span class="leftmain">个 人 名 称</span>
								<input type="text"  class="shurukuang" id="username">
							</p>
	
							<p class="main">
								<span class="leftmain">保 证 金&nbsp;&nbsp;&nbsp;&nbsp;</span>
								<input type="text"  class="shurukuang" id="deposit">
							</p>
							<p class="main">
								<span class="leftmain">合 同 期 限</span>
								<input type="text"  class="shurukuang" id="contractTime">
							</p>
							<p class="main">
								<span class="leftmain">客 户 电 话</span>
								<input type="text"  class="shurukuang" id="clientelePhone">
							</p>
							<p class="main">
								<span class="leftmain">客 服 Q Q&nbsp;</span>
								<input type="text"  class="shurukuang" id="serviceQQ">
							</p>
							<p class="main">
								<span class="leftmain">现在办公地址</span>
								<input type="text"  class="shurukuang" style="width:255px;margin-left: 21px" id="workLocation">
							</p>
							<p class="main" style="height:100px;">
								<span class="leftmain" style="position:relative;bottom:88px;">合 同 内 容</span>
								<textarea name="" id="contractContent" class="shurukuang" style="height:100px;margin-left: 40px;resize:none;" id="contractContent"></textarea>
							</p>
											
							<p class="main">
								<span class="leftmain">激 活 时 间</span>
								<input type="text"  class="shurukuang" id="activateTime">
							</p>
					        <p class="main">
								<span class="leftmain">申 请 性 质</span>
								<input type="text"  class="applyNature"  id="applyNature" style="width:255px;">
							</p>
							<p class="main">
								<span class="leftmain">合 作 单 位</span>
								<input type="text"  class="cooperator"  id="cooperator" style="width:255px;">
							</p>
							<p class="main">
								<span class="leftmain">合 约 比 例</span>
								<input type="text"  class="contractRate"  id="contractRate" style="width:255px;">
							</p>
							<p class="main">
								<span class="leftmain">产 品 类 别</span>
								<input type="text"  class="pCategory shurukuang"  id="pCategory" style="width:255px;">
							</p>
							<p class="main">
								<span class="leftmain">负 责 人</span>
								<input type="text"  class="rPerson shurukuang"  id="rPerson" style="width:255px;">
							</p>
							<p class="main">
								<span class="leftmain">招 商 经 理</span>
								<input type="text"  class="imanager"  id="imanager" style="width:255px;">
							</p>
							<p class="main">
								<span class="leftmain">审 批 状 态</span>
								<input type="text"  class="shurukuang" id="approvalState">
							</p>
							<p class="main" style="height:100px;">
								<span class="leftmain" style="position:relative;bottom:88px;">审 批 意 见</span>
								<textarea name="" id="approveOpinion" class="shurukuang" style="height:100px;margin-left: 40px;border:1px solid #bfbfbf;background:#fff;resize:none;"></textarea>
							</p>
							<p class="main" style="height:100px;padding-bottom:30px;">
								<span class="leftmain" style="position:relative;bottom:88px;">审 批 说 明</span>
								<textarea name="" id="remarks" class="shurukuang" style="height:100px;margin-left: 40px;border:1px solid #bfbfbf;background:#fff;resize:none;"></textarea>
							</p>

						</form>
						
					 </div> -->
					 
					 
					 
					 <div id="cover3">
						<form action="<%=basePath %>contractApprove/update.action" method="post">
							<table>
								<thead class="thed">
									<tr><th colspan="4">合 同 审 批 详 情<img src="../images/guanbi.png" alt="" class="guan"></th></tr>
								</thead>
								<tbody class="tbod">
									<tr>
										<td>提 交 时 间</td>
										<td><input type="text" name="saleStageName" class="shurukuang" id="saleStageName" onfocus="WdatePicker({skin:'whyGreen',dateFmt: 'yyyy-MM-dd', readOnly:true})"></td>
										<td>合 同 编 号</td>
										<td><input type="text" name="contractId"  class="shurukuang" id="contractId"></td>
									</tr>
									<tr>
										<td>个 人 名 称</td>
										<td><input type="text" name="username"  class="shurukuang" id="username"></td>
										<td>保 证 金</td>
										<td><input type="text"  class="shurukuang" id="deposit"></td>
									</tr>
									<tr>
										<td>合 同 期 限</td>
										<td><input type="text" name="contractTime" class="shurukuang" id="contractTime"></td>
										<td>客 户 电 话</td>
										<td><input type="text" name="clientelePhone"  class="shurukuang" id="clientelePhone"></td>
									</tr>
									<tr>
										<td>客 服 Q Q</td>
										<td><input type="text" name="serviceQQ"  class="shurukuang" id="serviceQQ"></td>
										<td>现在办公地址</td>
										<td><input type="text" name="workLocation"  class="shurukuang" style="width:150px;" id="workLocation"></td>
									</tr>
									<tr>
										<td>合 同 内 容</td>
										<td><textarea name="contractContent" id="contractContent" class="shurukuang" style="height:70px;resize:none;" id="contractContent"></textarea></td>
										<td>激 活 时 间</td>
										<td><input type="text" name="activateTime"  class="shurukuang" id="activateTime"  onfocus="WdatePicker({skin:'whyGreen',dateFmt: 'yyyy-MM-dd', readOnly:true})"></td>
									</tr>
									<tr>
										<td>申 请 性 质</td>
										<td><input type="text" name="applyNature"  class="applyNature"  id="applyNature" style="width:150px;"></td>
										<td>单 位 名 称</td>
										<td><input type="text" name="cooperator"  class="cooperator"  id="cooperator" style="width:150px;"></td>
									</tr>
									<tr>
										<td>合 约 比 例</td>
										<td><input type="text" name="contractRate"  class="contractRate"  id="contractRate" style="width:150px;"></td>
										<td>产 品 类 别</td>
										<td><input type="text" name="pCategory"  class="pCategory shurukuang"  id="pCategory" style="width:150px;"></td>
									</tr>
									<tr>
										<td>负 责 人</td>
										<td><input type="text" name="rPerson"  class="rPerson shurukuang"  id="rPerson" style="width:150px;"></td>
										<td>招 商 经 理</td>
										<td><input type="text" name="Imanager" class="imanager"  id="imanager" style="width:150px;"></td>
									</tr>
                                      <tr>
	                                       <td>
	                                        <input type="button" value="下载营业执照图片" onclick="bLicen(this)" id=""  class="bLicenseimageid" style="height:30px;line-height:30px;background:#bfbfbf;color:#616264;width: 150px;text-align: center;border-radius: 5px;">
						                    <br><input type="text" id="bLicenseimage" class="shurukuang" disabled="disabled">
	                                       </td>
	                                       <td>
	                                       <input type="button" value="下载身份证正面" onclick="identity(this)" id=""  class="identityFrontid" style="height:30px;line-height:30px;background:#bfbfbf;color:#616264;width: 150px;text-align: center;border-radius: 5px;">
							                <br><input type="text" id="identityFront" class="shurukuang" disabled="disabled">
	                                       </td>
	                                       <td>
	                                       	<input type="button" value="下载身份证反面" onclick="identityRever(this)" id=""  class="identityReverseid" style="height:30px;line-height:30px;background:#bfbfbf;color:#616264;width: 150px;text-align: center;border-radius: 5px;">
							               <br><input type="text" id="identityReverse" class="shurukuang" disabled="disabled">
	                                       </td>
	                                       <td>
	                                       	<input type="button" value="下载附加文件" onclick="fileUps(this)" id=""  class="fileUploadingid" style="height:30px;line-height:30px;background:#bfbfbf;color:#616264;width: 150px;text-align: center;border-radius: 5px;">
						                	<br><input type="text" id="fileUploading" class="shurukuang" disabled="disabled">
	                                       </td>
	                                       <input type="submit" value="确认修改" class="smit"/>
                                      	  <input type="hidden" name="contractApproveId" id="contractApproveId"/>
                                      </tr>
                                      
									
								</tbody>
							</table>
						</form>
					</div>
					 
    	</footer>
    	
    	<div class="smallas"></div>
    </body>
	<script type="text/javascript">
	var pageNums="${PageNum}";
	 function shanc(id){
    	 window.location.href="<%=basePath %>contractApprove/delect.action?id="+id+"&pageNums="+pageNums;
    }
	function daochu(){
		window.location.href="<%=basePath %>contractApprove/downlaodExecls.action"
	}
		    $('.M-box').pagination({
		    	pageCount: ${PageCount},//总页数
				current: ${PageNum},//当前页码
				callback:function(api){
					var pageNum=api.getCurrent();
					 var condition="${condition}";
			        $.ajax({  
			            type : "POST",  
			            url : "<%=basePath%>approve/countAllApprove.action",//路径  
			            data : {  
			            	pageNum : api.getCurrent(),
	    	            	"condition" : condition       
			            },
			            success : function(data) {
			            	pageNums=api.getCurrent();
			            	var number=data[0].number;//总页数
			            	api.setPageCount(number);//动态修改总页数为20页
			            	var pageNum=data[0].pageNum;
			            	var text="";
			            	$('.trs').remove();
	                      for(var i=0;i<data[0].list.length;i++){
	                    	  
	                           text=$('<tr class="trs"><td style="cursor:pointer;" onclick="dian('+data[0].list[i].approveId+')">'+data[0].list[i].approveId+'</td>'
	    								+'<td>'+data[0].list[i].cooperator+'</td><td>'+data[0].list[i].rPerson+'</td><td>'+data[0].list[i].contractId+'</td>'
	    								+'<td>'+data[0].list[i].clientelePhone+'</td><td>'+data[0].list[i].serviceQQ+'</td><td>'+data[0].list[i].applyNature+'</td>'
	    								+'<td>'+data[0].list[i].contractRate+'</td><td>'+data[0].list[i].pCategory+'</td><td>'+data[0].list[i].Imanager+'</td>'
	    								+'<td>'+data[0].list[i].Approvers+'</td><td>'+data[0].list[i].approvalState+'</td>'
	    								+'<td><input type="button" value="删除" onclick="shanc('+data[0].list[i].approveId+')"/><input type="button" value="修改" onclick="xiug('+data[0].list[i].approveId+')"/></td>'	
	    								+'</tr>')
	                           $('.tbodys').append(text);
	                          }
			    			/*<div class="content trs"><h6 class="sbox1"><span>审批人：'+data[0].list[i].ApproverId+'</span><span>类别：'+data[0].list[i].type+'</span><span>审批状态：'+data[0].list[i].approvalState+'</span><span>提交日期：'+data[0].list[i].saleStageName+'</span></h6><h5 class="ssbox1">正文：'+data[0].list[i].contractContent+'</h5><a href="#" class="more" onclick="dian('+data[0].list[i].approveId+','+pageNum+')">查看更多 ></a></div>*/
			            }
			        });  
			    }
			},function(api){
			    var pageNum;
			    var condition="${condition}";
			    $.ajax({  
			        type : "POST",  
			        url : "<%=basePath%>approve/countAllApprove.action",//路径  
			        data : {  
			        	pageNum : api.getCurrent(),
		            	"condition" : condition
			        },
			        success : function(data) {		     
			        	var number=data[0].number;//总页数
			        	api.setPageCount(number);//动态修改总页数为20页
			        	var pageNum=data[0].pageNum;
			        	var text="";  
	                    for(var i=0;i<data[0].list.length;i++){
	                    	console.log(data);
	                            text=$('<tr class="trs"><td style="cursor:pointer;" onclick="dian('+data[0].list[i].approveId+')">'+data[0].list[i].approveId+'</td>'
	    								+'<td>'+data[0].list[i].cooperator+'</td><td>'+data[0].list[i].rPerson+'</td><td>'+data[0].list[i].contractId+'</td>'
	    								+'<td>'+data[0].list[i].clientelePhone+'</td><td>'+data[0].list[i].serviceQQ+'</td><td>'+data[0].list[i].applyNature+'</td>'
	    								+'<td>'+data[0].list[i].contractRate+'</td><td>'+data[0].list[i].pCategory+'</td><td>'+data[0].list[i].Imanager+'</td>'
	    								+'<td>'+data[0].list[i].Approvers+'</td><td>'+data[0].list[i].approvalState+'</td>'
	    								+'<td><input type="button" value="删除" onclick="shanc('+data[0].list[i].approveId+')"/><input type="button" value="修改" onclick="xiug('+data[0].list[i].approveId+')"/></td>'	
	    								+'</tr>')
	                           $('.tbodys').append(text);
	                          }                               	
			        }
			    });  
			});
	</script>
    <script>
    function dians(){
		window.location.href="<%=basePath %>notice/findByAll.action";
		
	}
     $('.guan').click(function(event) {
    	 $('body').css('overflow','scroll');
    	 $('body').css('overflow-x','hidden');
    	$('.smallas').css('display', 'none');
    	$('#cover3').css('display', 'none');
    });
    		function dian(obj){
    			$('body').css('overflow','hidden')
    			document.getElementById('cover3').style.display='block';
    		$('.smallas').css('display', 'block');
    		$('.smit').css("display","none");
    		$('.tbod input').attr("disabled","disabled");
    		$('.tbod textarea').attr("disabled","disabled");
                 $.ajax({
                     url: '<%=basePath %>approve/findContract.action',
                     type: 'post',
                     data: {approveId: obj},
                     success:function(data){
                    	 console.log(data);
                    	 $('#saleStageName').val(data[0].saleStageName);//提 交 时 间
                    	 $('#contractId').val(data[0].contractId);//合 同 编 号
                    	 $('#username').val(data[0].username);//个 人 名 称
                    	 $('#deposit').val(data[0].deposit);//保 证 金
                    	 $('#contractTime').val(data[0].contractTime);//合 同 期 限
                    	 $('#clientelePhone').val(data[0].clientelePhone);//客 户 电 话
                    	 $('#serviceQQ').val(data[0].serviceQQ);//客 服 Q Q
                    	 $('#workLocation').val(data[0].workLocation);//现在办公地址
                    	  document.getElementById("contractContent").innerText=data[0].contractContent;//合 同 内 容
                    	 $('#activateTime').val(data[0].activateTime);//激 活 时 间
                    	 $('#pCategory').val(data[0].pCategory);//产品类别
                    	 $('#rPerson').val(data[0].rPerson);//负责人            
                    	 $('#cooperator').val(data[0].cooperator);///申请性质
                    	 $('#contractRate').val(data[0].contractRate);//合作单位
                    	 $('#imanager').val(data[0].imanager);//合约比例
                    	 $('#clientelePhone').val(data[0].clientelePhone);//招商经理
                    	 $('#applyNature').val(data[0].applyNature);
                    	 $('.bLicenseimageid').attr("id",show);
                    	 $('.identityFrontid').attr("id",show);
                    	 $('.identityReverseid').attr("id",show);
                    	 $('.fileUploadingid').attr("id",show);  
                    	 $('#bLicenseimage').val(data[0].bLicenseimage);
                    	 $('#identityFront').val(data[0].identityFront);
                    	 $('#identityReverse').val(data[0].identityReverse);
                    	 $('#fileUploading').val(data[0].fileUploading);
                     }
                 })
    		}
    		function xiug(show){
    			document.getElementById('cover3').style.display='block';
    		$('.smallas').css('display', 'block');
    		$('.tbod input').removeAttr("disabled");
    		$('.tbod textarea').removeAttr("disabled");
    		$(".smit").css("display","inline");
    		$("#approvalState").attr("disabled","disabled");
                 $.ajax({
                     url: '<%=basePath %>approve/findContract.action',
                     type: 'post',
                     data: {approveId: show},
                     success:function(data){
                    	 $('#saleStageName').val(data[0].saleStageName);//提 交 时 间
                    	 $('#contractId').val(data[0].contractId);//合 同 编 号
                    	 $('#username').val(data[0].username);//个 人 名 称
                    	 $('#deposit').val(data[0].deposit);//保 证 金
                    	 $('#contractTime').val(data[0].contractTime);//合 同 期 限
                    	 $('#clientelePhone').val(data[0].clientelePhone);//客 户 电 话
                    	 $('#serviceQQ').val(data[0].serviceQQ);//客 服 Q Q
                    	 $('#workLocation').val(data[0].workLocation);//现在办公地址
                    	  document.getElementById("contractContent").innerText=data[0].contractContent;//合 同 内 容
                    	 $('#activateTime').val(data[0].activateTime);//激 活 时 间
                    	 $('#pCategory').val(data[0].pCategory);//产品类别
                    	 $('#rPerson').val(data[0].rPerson);//负责人         
                    	 $('#cooperator').val(data[0].cooperator);///申请性质
                    	 $('#contractRate').val(data[0].contractRate);//合作单位
                    	 $('#imanager').val(data[0].imanager);//合约比例
                    	 $('#clientelePhone').val(data[0].clientelePhone);//招商经理
                    	 $('#applyNature').val(data[0].applyNature);
                    	 $('#contractApproveId').val(data[0].contractApproveId);
                    	 $('.bLicenseimageid').attr("id",show);
                    	 $('.identityFrontid').attr("id",show);
                    	 $('.identityReverseid').attr("id",show);
                    	 $('.fileUploadingid').attr("id",show);  
                    	 $('#bLicenseimage').val(data[0].bLicenseimage);
                    	 $('#identityFront').val(data[0].identityFront);
                    	 $('#identityReverse').val(data[0].identityReverse);
                    	 $('#fileUploading').val(data[0].fileUploading);
                     }
                 })
    		}
    		function showArray(){
    			 $('#saleStageName').val(data[0].saleStageName);//提 交 时 间
            	 $('#contractId').val(data[0].contractId);//合 同 编 号
            	 $('#username').val(data[0].username);//个 人 名 称
            	 $('#deposit').val(data[0].deposit);//保 证 金
            	 $('#contractTime').val(data[0].contractTime);//合 同 期 限
            	 $('#clientelePhone').val(data[0].clientelePhone);//客 户 电 话
            	 $('#serviceQQ').val(data[0].serviceQQ);//客 服 Q Q
            	 $('#workLocation').val(data[0].workLocation);//现在办公地址
            	  document.getElementById("contractContent").innerText=data[0].contractContent;//合 同 内 容
            	 $('#activateTime').val(data[0].activateTime);//激 活 时 间
            	 $('#pCategory').val(data[0].pCategory);//产品类别
            	 $('#rPerson').val(data[0].rPerson);//负责人            
            	 $('#cooperator').val(data[0].cooperator);///申请性质
            	 $('#contractRate').val(data[0].contractRate);//合作单位
            	 $('#imanager').val(data[0].imanager);//合约比例
            	 $('#clientelePhone').val(data[0].clientelePhone);//招商经理
            	 $('#applyNature').val(data[0].applyNature);
            	 $('.bLicenseimageid').attr("id",show);
            	 $('.identityFrontid').attr("id",show);
            	 $('.identityReverseid').attr("id",show);
            	 $('.fileUploadingid').attr("id",show);  
            	 $('#bLicenseimage').val(data[0].bLicenseimage);
            	 $('#identityFront').val(data[0].identityFront);
            	 $('#identityReverse').val(data[0].identityReverse);
            	 $('#fileUploading').val(data[0].fileUploading);
    		}
            
             
             function bLicen(obj){//营业执照图片
             	
             	window.location.href="<%=basePath %>contractApprove/download.action?vlaues=0&id="+obj.id;
             }
               function identity(obj){//身份证正面
               	
               	window.location.href="<%=basePath %>contractApprove/download.action?vlaues=1&id="+obj.id;
               }     
               function identityRever(obj){//身份证反面
               	
               	window.location.href="<%=basePath %>contractApprove/download.action?vlaues=2&id="+obj.id;
               }     
               function fileUps(obj){//附加文件
               	
               	window.location.href="<%=basePath %>contractApprove/download.action?vlaues=3&id="+obj.id;
               }     
    	</script>
</html>